import MainViewUI = ui.game.MainViewUI;
import WebGL = Laya.WebGL;
import Browser = Laya.Browser;
import Handler = Laya.Handler;
import Loader = Laya.Loader;


class Main{
    public stageW;
    public stageH;

    constructor() {		

        Laya.init(1440, 768, WebGL);
        Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL
        Laya.stage.alignH = Laya.Stage.ALIGN_CENTER
        Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE
        Laya.stage.screenMode = Laya.Stage.SCREEN_HORIZONTAL
        Laya.stage.bgColor = "#555555"
        // Browser.window.onresize = onWindowResize
        // Laya.loader.load([{url:"res/atlas/comp.json",type:Loader.ATLAS},{url:"res/atlas/main.json",type:Loader.ATLAS}], Handler.create(this, this.onLoaded));
        Laya.loader.load(["res/atlas/comp.atlas","res/atlas/main.atlas"], Handler.create(this, this.onLoaded));
        
	}
    onLoaded(){
        // common.LoaddingDialog.show(false)
        let ui:View = new GameMain();
		Laya.stage.addChild(ui);
        // Laya.timer.once(1000,this,function(){
        //     common.LoaddingDialog.hide();
        // })
        
    }
        
}
//程序入口
new Main()
